package com.clwl.supervise.superviseapp.mapper.supervise;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clwl.supervise.superviseapp.entity.base.CommonSearchEntity;
import com.clwl.supervise.superviseapp.entity.supervise.JgSchemePlanCheck;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@Mapper
public interface JgSchemePlanCheckMapper extends BaseMapper<JgSchemePlanCheck> {


    IPage<Map<String, Object>> selectCompanyList(IPage<Map<String, Object>> iPage,@Param("params") CommonSearchEntity params);

    IPage<Map<String, Object>> selectCheckResult(IPage<Map<String, Object>> iPage,@Param("params") CommonSearchEntity params);

    Map<String, Object> selectMapById(@Param("checkId") Long checkId);
    /**
     * 按检查年份和主体ID查询最新的检查次数
     * @param checkYear
     * @param companyId
     * @return
     */
    Integer  queryMaxCheckNumByCheckYearAndCompanyId(@Param("checkYear") String checkYear,@Param("companyId") Long companyId);
}